#コマンド対応用

def command(str)
	source = str.scan(/<[a-zA-Z0-9]*>/)
	source.each{|command|
		temp = command.gsub("<",'').gsub(">",'')
		case temp
		when "NowTime"
			answer = Time.now.strftime("%H:%M:%S")
		when "Date"
			answer = Time.now.strftime("%Y/%m/%d")
		end
		str.sub!(command,answer) if(answer!=nil)
	}
	return str
end
